/*
 * Copyright (C) 2012 JiangHongTiao
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package sk.lieskove.jianghongtiao.paris.core.persistence;

import java.io.Serializable;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import org.apache.log4j.Logger;
import sk.lieskove.jianghongtiao.common.utils.PropertiesUtils;
import sk.lieskove.jianghongtiao.websearch.persistence.ClassificationStorage;

/**
 * 
 * @author xjuraj e-mail: jjurco.sk_gmail.com
 */
@Entity
public class TrainSetClassificationStorage implements Serializable {
    
    private transient Logger log = Logger.getLogger(TestSetClassificationStorage.class);
    private transient PropertiesUtils pu = new PropertiesUtils(TestSetClassificationStorage.class);
    
    @Id
    @GeneratedValue(strategy= GenerationType.SEQUENCE)
    private Long id;
    private String originalClass;
    @ManyToOne(fetch= FetchType.EAGER)
    private ClassificationStorage classificationStorage;
    @ManyToOne(fetch= FetchType.EAGER, cascade=CascadeType.PERSIST)
    private TrainSet trainSet;

    public TrainSetClassificationStorage() {
    }

    public TrainSet getTrainSet() {
        return trainSet;
    }
    
    public TrainSetClassificationStorage copy(){
        TrainSetClassificationStorage t = new TrainSetClassificationStorage();
        t.classificationStorage = classificationStorage;
        t.originalClass = originalClass;
        t.trainSet = trainSet;
        return t;
    }

    public void setTrainSet(TrainSet trainSet) {
        this.trainSet = trainSet;
    }
    
    public ClassificationStorage getClassificationStorage() {
        return classificationStorage;
    }

    public void setClassificationStorage(ClassificationStorage classificationStorage) {
        this.classificationStorage = classificationStorage;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getOriginalClass() {
        return originalClass;
    }

    public void setOriginalClass(String originalClass) {
        this.originalClass = originalClass;
    }
    
    
}
